package com.xr.miniprogram.service.impl;

import java.util.Arrays;
import java.util.List;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.xr.miniprogram.mapper.MiniProgramServiceSnapshotMapper;
import com.xr.miniprogram.domain.MiniProgramServiceSnapshot;
import com.xr.miniprogram.service.IMiniProgramServiceSnapshotService;

/**
 * 服务Service业务层处理
 * 
 * @author wls
 * @date 2023-12-05
 */
@Service
public class MiniProgramServiceSnapshotServiceImpl implements IMiniProgramServiceSnapshotService 
{
    @Autowired
    private MiniProgramServiceSnapshotMapper miniProgramServiceSnapshotMapper;

    @Override
    public MiniProgramServiceSnapshot queryById(Long serviceSptId)
    {
        return miniProgramServiceSnapshotMapper.selectById(serviceSptId);
    }

    @Override
    public List<MiniProgramServiceSnapshot> queryList()
    {
        return miniProgramServiceSnapshotMapper.selectList(new QueryWrapper<>());
    }

    @Override
    public int queryAdd(MiniProgramServiceSnapshot miniProgramServiceSnapshot)
    {
        return miniProgramServiceSnapshotMapper.insert(miniProgramServiceSnapshot);
    }

    @Override
    public int queryUpdate(MiniProgramServiceSnapshot miniProgramServiceSnapshot)
    {
        return miniProgramServiceSnapshotMapper.updateById(miniProgramServiceSnapshot);
    }

    @Override
    public int queryDeleteByIds(Long[] serviceSptIds)
    {
        return miniProgramServiceSnapshotMapper.deleteBatchIds(Arrays.asList(serviceSptIds));
    }

    @Override
    public int queryDeleteById(Long serviceSptId)
    {
        return miniProgramServiceSnapshotMapper.deleteById(serviceSptId);
    }
}
